package com.mybatisplus.multidatasource.order.service;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.mybatisplus.multidatasource.order.entity.OrderEntity;
import com.mybatisplus.multidatasource.order.mapper.OrderMapper;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author: J.K
 * @Date: 2021-09-22 10:24
 * @Description:
 */
@RestController
@DS(value = "mybatis_plus_order")
public class OrderService {
    @Resource
    private OrderMapper orderMapper;

    @GetMapping("/findByOrderId")
    public OrderEntity findByOrderId(Long orderId) {
        return orderMapper.selectById(orderId);
    }
}
